package com.jd.shop.controller;

import com.jd.shop.dto.OrderDTO;
import com.jd.shop.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author <a href="https://fengwenyi.com?fs=mpcg">Erwin Feng</a>
 * @since 2023-12-06
 */
@RestController
public class ShopOrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping("/seckil/shopOrder")
    public String seckill(@RequestParam(value = "id") Long id) {
        OrderDTO orderDTO = new OrderDTO();
        orderDTO.setOrderId(id);
        orderService.seckill(orderDTO);
        return "success";
    }
}
